package com.ynet.middleground.approve.bean;

import java.util.List;
import java.util.Map;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;

import com.ynet.core.common.BaseReqObj;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @author liulx
 * @description 任务节点跳转请求类
 * @date 2019-11-01 10:10
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "任务跳转请求对象", description = "任务跳转请求对象，适用于任务撤销、退回、驳回操作")
public class RecallTaskReq extends BaseReqObj {

    private static final long serialVersionUID = 4860406883715945473L;

    @ApiModelProperty(value = "当前任务ID", notes = "当前任务ID", dataType = "String", required = true)
    @NotBlank(message = "当前任务ID不能为空")
    private String currentTaskId;

    @ApiModelProperty(value = "目标任务定义ID, 自定义节点跳转时需要填写该字段", notes = "目标任务定义ID", dataType = "String")
    private String targetTaskKeyId;

    @ApiModelProperty(value = "任务处理人, 填写会校验与当前任务处理人是否一致", notes = "任务处理人", dataType = "String")
    private String assignee;

    @ApiModelProperty(value = "备注（理由）", notes = "备注（理由）", dataType = "String")
    private String reason;

    @ApiModelProperty(
        value = "操作意图，该字段仅用于记录任务操作人的意图\n 0: 发起申请,\n 1: 同意,\n 2: 驳回至上一节点,\n"
            + " 3: 退回（退到发起人）,\n 4: 拒绝（用于会签投票）,\n 5: 撤销申请,\n 6: 跳转,\n 7:驳回至发起人, \n 8:转办, \n 9:驳回修改, \n 10:不同意; 默认：6；（自定义任务节点跳转专用）",
        notes = "操作意图，该字段仅用于记录任务操作人的意图\n 0: 发起申请,\n 1: 同意,\n 2: 驳回至上一节点,\n"
            + " 3: 退回（退到发起人）,\n 4: 拒绝（用于会签投票）,\n 5: 撤销申请,\n 6: 跳转,\n 7:驳回至发起人, \n 8:转办, \n 9:驳回修改, \n 10:不同意; 默认：6；（自定义任务节点跳转专用）",
        required = true, dataType = "int")
    private int jumpPurpose = 6;

    @ApiModelProperty(value = "任务自定义参数", notes = "任务自定义参数", dataType = "java.util.Map")
    private Map<String, Object> variables;

    @ApiModelProperty(value = "业务数据（自定义任务节点跳转专用）", notes = "业务数据（自定义任务节点跳转专用）")
    private List<BusinessModuleData> businessData;

    @ApiModelProperty(value = "流程摘要（自定义任务节点跳转专用）", notes = "流程摘要（自定义任务节点跳转专用）", dataType = "String")
    private String processRemark;

    @ApiModelProperty(value = "金控经办人员Id（自定义任务节点跳转专用）", notes = "金控经办人员Id（自定义任务节点跳转专用）", dataType = "String")
    private String jinKongHandling;

    @ApiModelProperty(value = "业务场景（自定义任务节点跳转专用）", notes = "业务场景（自定义任务节点跳转专用）", dataType = "String")
    private String businessScene;

    @ApiModelProperty(value = "公司名称", notes = "公司名称", dataType = "String")
    private String companyName;

    @ApiModelProperty(value = "产品名称", notes = "产品名称", dataType = "String")
    private String productName;

    @ApiModelProperty(value = "审批意见附件信息列表", notes = "审批意见附件信息列表")
    @Valid
    private List<CommentFile> commentFiles;
}
